package huawei;

import java.util.Scanner;

/**
 * 分割字符串
 * 输入两行字符串
 * 每行字符串，每8个字符分割输出，不够8个补0
 */
public class SplitString {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            String s1 = sc.next();
            String s2 = sc.next();
            print(s1);
            print(s2);
        }
    }

    private static void print(String s) {
        if (s == null || "".equals(s)) return;
        StringBuilder str = new StringBuilder("");
        int n = s.length();
        if (n <= 8) {
            str.append(s.substring(0,n));
            for (int i = 0; i < 8 - n; ++i) {
                str.append("0");
            }
            System.out.println(str.toString());
        } else {
            System.out.println(s.substring(0, 8));
            print(s.substring(8, n));
        }
    }


}
